/* 
    @fiel:  protocol.h
    @code:  c(//utf-8)
 */


#ifndef _PROTOCOL_H
#define _PROTOCOL_H

#ifdef __cplusplus
extern "C" {
#endif

/* ------------------------------------------------------------------------- */

#include "stdint.h"

typedef struct protocol
{
    unsigned char           *   pbuf;   //analyse buf
    unsigned char           *   pbufs;  //analyse buf2  null if no used
    unsigned int                bufsize;
    unsigned int                datacnt;
    unsigned char               step;
    unsigned int                targcnt;
}protocol_t;


unsigned char ProtocolRun(protocol_t * pptl,unsigned char ich);
/* ------------------------------------------------------------------------- */

#ifdef __cplusplus
}
#endif

#endif //#ifndef _PROTOCOL_H